package chapter05;

public class Main {

    public static void main(String[] args) {
        Object o1 = new Object();
        Object o2 = new Object();
        Object o3 = o2;

        System.out.println("o1's hashcode: " + o1.hashCode());
        System.out.println("o2's hashcode: " + o2.hashCode());
        System.out.println("o3's hashcode: " + o3.hashCode());

        String[] arr = {"a", "b"};
        System.out.println(arr.length);


        //静态初始化数组：方法一
        String cats[] = new String[] {
                "Tom","Sam","Mimi"
        };

        //静态初始化数组：方法二
        String dogs[] = {"Jimmy","Gougou","Doggy"};

        //动态初始化数据
        String books[] = new String[2];
        books[0] = "Thinking in Java";
        books[1] = "Effective Java";

        System.out.println(cats.length);
        System.out.println(dogs.length);
        System.out.println(books.length);


    }
}
